package com.difsonapps.contacttranslator.dto;

public enum NumberTypeEnum {
	MOBILE(0), BUREAU(1),DOMICILE(2),PRINCIPAL(3),OTHER(4),CUSTOM(5);

	private int code;

	private NumberTypeEnum(int code) {
		this.code = code;
	}

	public static NumberTypeEnum getDefault() {
		return NumberTypeEnum.MOBILE;
	}

	public int getCode() {
		return code;
	}

	public static NumberTypeEnum get(int code) {
		switch (code) {
		case 0:
			return MOBILE;
		case 1:
			return BUREAU;
		case 2:
			return DOMICILE;
		case 3:
			return PRINCIPAL;
		case 4:
			return OTHER;
		case 5:
			return CUSTOM;
		}
		return MOBILE;
	}
}
